
import { MongooseFactory } from "../kalend";
import { Schema } from "mongoose";

/** 商户菜品表 */
const schema = MongooseFactory.Schema({
    merchantid: {
        type: Schema.Types.ObjectId,
        ref: "merchant"
    },
    name: {
        type: String
    },
    lable: {
        type: String
    },
    // 类型用于排序 1：推荐 2：热销 9：其它
    type: [{
        type: String
    }],
    price: {
        type: Number
    },
    img: {
        type: String
    },
    order: {
        type: Number,
        default: 9999
    },
    remarks: {
        type: String
    },
    creater: {
        type: Schema.Types.ObjectId,
        ref: "platform_user"
    },
    status: {
        type: Number,
        default: 1
    }
});



export const merchant_disheModel = MongooseFactory.Model("merchant_dishe", schema);